import request from '@/utils/request';

// 查询金额配置

export async function getWithdrawalamount(params={}) {
	const res = await request.post('/business/withdrawalamount/getWithdrawalamount', {});
  //   return res
  console.log(res)
	if (res.data.code === 2000) {
  
	  return res.data;
	}
	return Promise.reject(new Error(res.data.msg));
}
// 新增金额配置

export async function insertSelective(params) {
	const res = await request.post('/business/withdrawalamount/insertSelective', params);
  //   return res
  console.log(res)
	if (res.data.code === 2000) {
  
	  return res.data;
	}
	return Promise.reject(new Error(res.data.msg));
}
/**
 * 新增/修改 服务代理配置
 */
export async function addPayparameter(params) {
  const res = await request.post('/business/payparameter/addPayparameter', params);
//   return res
console.log(res)
  if (res.data.code === 2000) {

    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}


/**
 *  查询 服务代理配置
 */

export async function getPayparameter(params) {
	const res = await request.post('/business/payparameter/getPayparameter', params);
	if (res.data.code === 2000) {
	  return res.data;
	}
	return Promise.reject(new Error(res.data.message));
  }

